<?php $this->_extends('_layouts/landingpage_layout'); ?>

<?php $this->_block('title'); ?>
<?php
if (!empty($_SESSION['ga_title']))
{
	echo $_SESSION['ga_title'];
}
else{
	echo 'Register to Play Fun Games and Win Cash Prizes- CashDazzle. Get One Free Spin Now!';
}
?>
<?php $this->_endblock(); ?>

<?php $this->_block('keywords');?>
<meta name="keywords" content="<?php echo $site['keywords']; ?>" />
<?php $this->_endblock();?>

<?php $this->_block('description');?>
<meta name="description" content="CashDazzle: join our community of casual gamers." />
<?php $this->_endblock();?>

<?php $this->_block('content'); ?>
<div class="content">
	<form action="<?php echo url('user/registering'); ?>" method="post">
		<div class="form">
			<div class="form-con-t"></div>
			<div class="form-con">
				<?php 
					if(isset($errors)){
						echo "<div class='errors'>";
						foreach ($errors as $error){
							echo "<div>$error</div>";
						}
						echo "</div>";
					}
				?>
				<ul>
					<li>
						<label class="control-label">*Salutation</label>
						<div class="left">
							<select name="gender">
								<option value="M" <?php echo isset($accountinfo['gender']) && $accountinfo['gender'] == 'M' ? 'selected="selected"' : '' ?>>Mr.</option>
								<option value="F" <?php echo isset($accountinfo['gender']) && $accountinfo['gender'] == 'F' ? 'selected="selected"' : '' ?>>Ms.</option>
							</select>
							<span class="required">* required fields</span>
						</div>
					</li>
					<li>
						<label class="control-label">*First Name</label>
						<div class="left">
							<input class="inputtxt" name="firstname" id="firstname" value="<?php echo isset($accountinfo['fname']) ? $accountinfo['fname'] : ''; ?>"/>
						</div>
					</li>
					<li>
						<label class="control-label">*Last Name</label>
						<div class="left">
							<input class="inputtxt" name="lastname" id="lastname" value="<?php echo isset($accountinfo['lname']) ? $accountinfo['lname'] : ''; ?>"/>
						</div>
					</li>
					<li>
						<label class="control-label">*Birthday</label>
						<div class="left">
							<span class="month">
								<select id="month" class="" name="birthMonth">
									<option value=""  label="Month">Month</option>
									<option value="01" label="January" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '01')? 'selected="selected"' : '';?>>January</option>
									<option value="02" label="February" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '02')? 'selected="selected"' : '';?>>February</option>
									<option value="03" label="March" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '03')? 'selected="selected"' : '';?>>March</option>
									<option value="04" label="April" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '04')? 'selected="selected"' : '';?>>April</option>
									<option value="05" label="May" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '05')? 'selected="selected"' : '';?>>May</option>
									<option value="06" label="June" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '06')? 'selected="selected"' : '';?>>June</option>
									<option value="07" label="July" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '07')? 'selected="selected"' : '';?>>July</option>
									<option value="08" label="August" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '08')? 'selected="selected"' : '';?>>August</option>
									<option value="09" label="September" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '09')? 'selected="selected"' : '';?>>September</option>
									<option value="10" label="October" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '10')? 'selected="selected"' : '';?>>October</option>
									<option value="11" label="November" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '11')? 'selected="selected"' : '';?>>November</option>
									<option value="12" label="December" <?php echo (isset($accountinfo['birthMonth']) && $accountinfo['birthMonth'] == '12')? 'selected="selected"' : '';?>>December</option>
								</select>
							</span>
							<span class="day">
								<select id="day" class="" name="birthDay">
									<option value="" selected="selected" label="Day">Day</option>
									<?php 
										$days = array(
												'01', '02', '03', '04', '05', '06', '07', '08', '09'
												,'10', '11', '12', '13', '14', '15', '16', '17', '18', '19'
												,'20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'
										);
										foreach ($days as $day):
										
											if(isset($accountinfo['birthDay']) && $accountinfo['birthDay'] == $day):
									?>
												<option value="<?php echo $day?>" selected="selected"><?php echo $day?></option>
											<?php else: ?>
												<option value="<?php echo $day?>"><?php echo $day?></option>
									<?php 
											endif;
										endforeach;
									?>
									</select>
							</span>
							<span class="year">
								<select id="year" class="" name="birthYear">
									<option value="" selected="selected" label="Year">Year</option>
									<?php 
										$currentYear = (int) date('Y');
										$maxYear = $currentYear-18;
										$minYear = $currentYear-100;
										for ($i = $maxYear; $i >= $minYear; $i--) :
									?>
										<option value="<?php echo $i; ?>" <?php echo (isset($accountinfo['birthYear']) && intval($accountinfo['birthYear']) == $i) ? 'selected="selected"' : '';?>><?php echo $i;?></option>
									<?php endfor;?>
								</select>
							</span>
						</div>
					</li>
					<li>
						<label class="control-label">*Email</label>
						<div class="left">
							<input class="inputtxt" name="email" id="email" value="<?php echo isset($accountinfo['email']) ? $accountinfo['email'] : ''; ?>" />
						</div>
					</li>
					<li>
						<label class="control-label">*Password</label>
						<div class="left">
							<input class="inputtxt" type="password" name="password" id="password" />
						</div>
					</li>
					<li>
						<label class="control-label">*Verify Password</label>
						<div class="left">
							<input class="inputtxt" type="password" name="repassword" id="repassword" />
						</div>
					</li>
				</ul>
				<label class="checkbox">
					<label class="required-star">*</label><input type="checkbox" name="terms" id="terms" />By checking this box I agree that I am a US resident over the age of 18, agree to the <a href="<?php echo url('privacypolicy');?>" target="_blank">Privacy Policy</a> and the <a href="<?php echo url('terms');?>" target="_blank">Terms and Conditions</a>, and agree to receive daily offers from CashDazzle.com and Dazzle-Deals.com.
				</label>
				<input type="hidden" name="viewname" value="landingpage" />
				<input type="submit" class="submit-btn" style="background:url(<?php echo $img_url;?>landingpage/submit-btn.png) transparent no-repeat; border:none; width:208px; height:51px; cursor:pointer;" name="submit" value="" />
			</div>
			<div class="form-con-b"></div>
			<div class="clear"></div>
		</div>
	</form>
	<div class="footer">
		<a href="<?php echo url('default/index'); ?>"><img class="logo" src="<?php echo $img_url;?>landingpage/logo.png" /></a>
		<div class="footer-con">
			<p class="footer-txt"><a href="<?php echo url('default/index'); ?>">www.cashdazzle.com</a> gives you the chance to win every day by playing your favorite games and entering sweepstakes! The more you play, the more chances you have to win! Join our gaming community and challenge your friends and family to beat your high scores!</p>
			<p class="footer-txt">© 2011-2012 cashdazzle.com. All rights reserved.</p>
		</div>
	</div>
	<div class="clear"></div>
</div>
<script type="text/javascript" src="http://pixel.sitescout.com/ap/50a9c1838e6514c2"></script>
<?php $this->_endblock('contents'); ?>